package com.bgs.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="Finance对象", description="门店财务表")
public class Finance implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "财务id")
    @TableId(value = "finance_id", type = IdType.AUTO)
    private Integer financeId;

    @ApiModelProperty(value = "收入")
    private Double income;

    @ApiModelProperty(value = "支出")
    private Double expenditure;

    @ApiModelProperty(value = "订单类型（1是回收订单 2是商品订单 3是其他）")
    private Integer orderType;

    @ApiModelProperty(value = "财务状态（1是已入账 2是已出账）")
    private Integer financeState;

    @ApiModelProperty(value = "订单编号")
    private String number;

    @ApiModelProperty(value = "门店id")
    private Integer storeId;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//DateTimeFormat 是入参格式化；
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")//JsonFormat是出参格式化。
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime creationTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//DateTimeFormat 是入参格式化；
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")//JsonFormat是出参格式化。
    @ApiModelProperty(value = "修改时间")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "是否删除（y是删除 n是未删除）")
    private String isDel;


    private Integer wallet;

}